package com.daka.dao;

import com.daka.entity.Goods;
import com.daka.mybatis.SQLMapper;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;


@Repository(value = "goodsDao")
@SQLMapper
public interface GoodsDao {

    int insert(Goods record);

    Goods selectByPrimaryKey(Long id);

    Goods selectByCode(String code);

    List<Goods> selectByType(Integer type);

    List<Goods> selectByTypeOrderByAmount(Integer type);

    List<Goods> selectByStatement(Goods record);

    int selectByStatementCount(Goods record);

    int updateByPrimaryKeySelective(Goods record);

    List<Goods> selectAll();

    List<Goods> selectA();
    List<Goods> selectB();

    BigDecimal sumTotal();
}